package com.auxgroup;

import com.auxgroup.smarthome.ApplicationEventListener;
import com.auxgroup.smarthome.jwt.JwtConstant;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;

import javax.annotation.PostConstruct;

/**
 * Created by kevinchen on 2017/7/24.
 */
@EnableFeignClients
@EnableDiscoveryClient
@SpringBootApplication
public class BusinessMgtApplication {
    public static void main(String[] args) {
//        SpringApplication.run(BusinessMgtApplication.class, args);
        SpringApplication springApplication = new SpringApplication(BusinessMgtApplication.class);
        springApplication.addListeners(new ApplicationEventListener());
        springApplication.run(args);
    }

    @PostConstruct
    public void init() {
        // 初始化JWT配置
        JwtConstant.readProperties();
    }

}
